package org.fve.log;

import java.io.IOException;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;


public class logger {
	static private FileHandler fileTxt;
	private static Logger logger = Logger.getLogger("RTT-Server");
	public logger(String userid) {
		// Create Logger
		
		logger.setLevel(Level.INFO);
		try {
			fileTxt = new FileHandler("Log_"+userid+"_.txt");
		} catch (SecurityException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		//fileHTML = new FileHandler("Logging.html");
		
		logger.addHandler(fileTxt);
		//logger.addHandler(fileHTML);
	}
	
	public void WriteLog(String log){
		logger.info(log);
	}
	
}